Skip to content

fix(rpc): handle properly action form#309

Merged
arnaud-moncel merged 3 commits into
mainfrom
fix/rpc/action-form
May 22, 2026
Merged

fix(rpc): handle properly action form#309
arnaud-moncel merged 3 commits into
mainfrom
fix/rpc/action-form

Conversation

@arnaud-moncel
Copy link
Copy Markdown
Member

@arnaud-moncel arnaud-moncel commented May 21, 2026

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Note

Fix RPC schema to include static_form in serialized actions

  • Adds static_form to the RPC wire schema by including it in serialize_actions, alongside scope, is_generate_file, description, and submit_button_label; form and execute are explicitly excluded.
  • Updates BaseAction.initialize to accept a static_form parameter (default: false) and passes it through from from_plain_object, so the value from the schema is preserved on the instance.
  • Refactors build_rpc_schema_from_datasource in agent.rb into smaller helpers (extract_rpc_collection_relations, build_normal_collection_payload, serialize_actions) to cleanly separate schema-building concerns.

Changes since #309 opened

  • Modified ForestAdminDatasourceCustomizer::Decorators::Action::BaseAction.from_plain_object factory method to default the static_form attribute to boolean false when the input value is nil or missing [f72150c]

Macroscope summarized aedfadb.

@qltysh
Copy link
Copy Markdown

qltysh Bot commented May 21, 2026

2 new issues

Tool Category Rule Count
qlty Structure Function with many parameters (count = 7): initialize 1
qlty Structure Function with high complexity (count = 6): extract_rpc_collection_relations 1


def initialize(scope:, form: nil, is_generate_file: false, description: nil, submit_button_label: nil, &execute)
# rubocop:disable Metrics/ParameterLists
def initialize(scope:, form: nil, is_generate_file: false, description: nil,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 7): initialize [qlty:function-parameters]

next if relation_targets_rpc_collection?(field)

relations[field_name] = field
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with high complexity (count = 6): extract_rpc_collection_relations [qlty:function-complexity]

@arnaud-moncel arnaud-moncel merged commit f86013c into main May 22, 2026
44 checks passed
@arnaud-moncel arnaud-moncel deleted the fix/rpc/action-form branch May 22, 2026 08:24
forest-bot added a commit that referenced this pull request May 22, 2026
## [1.30.3](v1.30.2...v1.30.3) (2026-05-22)

### Bug Fixes

* **rpc:** handle properly action form ([#309](#309)) ([f86013c](f86013c))
@forest-bot
Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.30.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants